#include "username.h"

//Username::Username(QString n, QString cn, QString u, QString p, gender x):nome(n), cognome(cn), username(u),pwd(p), sesso(x){}
Username::Username(QString n, QString cn, QString u, QString p, int ss):nome(n), cognome(cn), username(u),pwd(p){
    switch (ss){
    case 0:
        sesso=femmina;
        break;
    case 1:
        sesso=maschio;
        break;
    }
}

Username::Username(const Username& u){
    cout<<"CopiaUsername"<<endl;
    username= u.username;
    pwd= u.pwd;
    nome= u.nome;
    cognome= u.cognome;
    sesso= u.sesso;
}

QString Username::getUsn() const{
    return username;
}

QString Username::getPwd() const{
    return pwd;
}

QString Username::getN() const{
    return nome;
}

QString Username::getC() const{
    return cognome;
}

int Username::getG() const{
    return sesso;
}
